package com.DataFactory.TaskManagement.Aspect;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class MethodAspect {
    @Pointcut("execution(* com.DataFactory.TaskManagement.controller..*(..) )")
    void showNamePointCut(){}
    @Before("showNamePointCut()")
    void showControllerMethodName(JoinPoint joinPoint){
        System.out.println(joinPoint.getSignature().getName()+"正在执行");
    }
    @Pointcut("execution(* com.DataFactory.TaskManagement.service..*(..) )")
    void showServiceMethodName(){}

    @Before("showServiceMethodName()")
    void showServiceMethodName(JoinPoint joinPoint){
        System.out.println(joinPoint.getSignature().getName()+"正在执行");
    }
}
